package com.leyou.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("auth-service")
public interface AuthClient {

    /**
     * 给每个微服务颁发token的接口
     * @param id        微服务的id
     * @param secret    微服务的密码
     * @return          JWT
     */
    @GetMapping("/authorization")
    public String authorization(@RequestParam("id") Long id,@RequestParam("secret") String secret);
}
